package hlhj.fhp.supreme

import android.support.v7.app.AppCompatActivity
import android.os.Bundle
import com.gyf.barlibrary.ImmersionBar
import hlhj.fhp.supreme.customview.LoadingDialog
import hlhj.fhp.supreme.utils.MyUtils

abstract class BaseAty : AppCompatActivity() {
    open lateinit var loadingDialog:LoadingDialog
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(getContentId())
        loadingDialog=LoadingDialog(this)
        initView()
        initData()
        initListener()
        supportActionBar?.hide()
        MyUtils.AtyContainer.getInstance().addActivity(this)
        ImmersionBar.with(this)
                .statusBarDarkFont(false)
                .init()
    }

    override fun onResume() {
        super.onResume()
        supportActionBar?.hide()

    }
     open  fun initListener() {
    }

    open fun initData() {

    }

    open fun initView() {
    }

    protected abstract fun getContentId():Int
}
